package com.loongtech.bi.manager.game;

import com.loongtech.bi.entity.game.EntityActiveRoleInstanceStay;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ActiveRoleInstanceStayManager extends ManagerQueryCacheBase<EntityActiveRoleInstanceStay> {
	private static final long serialVersionUID = 1L;
	
	public List<EntityActiveRoleInstanceStay> getActiveRoleInstanceStay(Date dateStart, Date dateEnd, String queryPlatform, String queryChannel, String queryServer, List<Integer> queryInstanceName) {
		return findByQuery("from EntityActiveRoleInstanceStay where day>=:dayStart and day<=:dayEnd and platformid = :queryPlatform and channelid = :queryChannel and serverid = :queryServer and  instancetid in(:instancetid)  ", "dayStart", dateStart, "dayEnd", dateEnd, "queryPlatform", queryPlatform, "queryChannel", queryChannel, "queryServer", queryServer, "instancetid", queryInstanceName);
	}
}
